#
# Copyright (C) 2008 Erik van Oosten
#
# MIT license.
#

module EmailHelper

  def errors_for(object, field)
    if object && object.errors.on(field)
      e = object.errors.on(field)
      e = e.to_sentence if e.respond_to? :to_sentence
      content_tag(:span, e, :class => 'error-messages')
    end
  end

end
